package BRU

import chisel3._
import chisel3.util._

object BruInstr {
  def B          = BitPat("b000101??????????????????????????")
  def BL         = BitPat("b100101??????????????????????????")
  def BR         = BitPat("b1101011000011111000000?????00000")
  def BLR        = BitPat("b1101011000111111000000?????00000")
  def RET        = BitPat("b1101011001011111000000?????00000")
  def BCON       = BitPat("b01010100???????????????????0????")
  def CBNZ       = BitPat("b?0110101????????????????????????")
  def CBZ        = BitPat("b?0110100????????????????????????")
  def TBNZ       = BitPat("b?0110111????????????????????????")
  def TBZ        = BitPat("b?0110110????????????????????????")
  def ADR        = BitPat("b0??10000????????????????????????")
  def ADRP       = BitPat("b1??10000????????????????????????")

}

class ExStageDataIn extends Bundle {
  val vld = Bool()
  val idm = UInt(64.W)
}

class BrDataIO extends Bundle {
  val brType = UInt(3.W)
  val brTarget = UInt(64.W)
  val misPredict = Bool()
  val brVal = UInt(1.W)
  val brTaken = Bool()
}